package corerun

import (
	"core/coreinfo"
	"core/corestruct"
	"core/coreutil"
	"reflect"
)

func ActionInit() {
	var mcls = &corestruct.Action{}
	var m = &corestruct.MyClass{
		Name:     "Action",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  coreinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddDto(m)
}

func IdModelInit() {
	var mcls = &corestruct.IdModel{}
	var m = &corestruct.MyClass{
		Name:     "Id类型",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  coreinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddDto(m)
}

func IdNameAttrDtoInit() {
	var mcls = &corestruct.IdNameAttrDto{}
	var m = &corestruct.MyClass{
		Name:     "带名称带属性的Id类型",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  coreinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddDto(m)
}

func IdNameDtoInit() {
	var mcls = &corestruct.IdNameDto{}
	var m = &corestruct.MyClass{
		Name:     "带名称的Id类型",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  coreinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddDto(m)
}

func MyClassInit() {
	var mcls = &corestruct.MyClass{}
	var m = &corestruct.MyClass{
		Name:     "struct类型",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  coreinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddDto(m)
}

func MyFieldInit() {
	var mcls = &corestruct.MyField{}
	var m = &corestruct.MyClass{
		Name:     "struct字段",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  coreinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddDto(m)
}

func PageInit() {
	//var mcls = &corestruct.Page{}
	//var m = &corestruct.MyClass{
	//	Name:     "分页类型",
	//	Ename:    "",
	//	FullName: "",
	//	Memo:     "",
	//	Fileds:   nil,
	//	PrjName:  coreinfo.PRJ_NAME,
	//	Type:     reflect.TypeOf(mcls),
	//}
	//coreutil.StructUtil.AddDto(m)
}

func CoreStructInit() {
	ActionInit()
	IdModelInit()
	IdNameAttrDtoInit()
	IdNameDtoInit()
	MyClassInit()
	MyFieldInit()
	PageInit()

}
